//.nemo-window GtkEventBox { background-color: $bg_color; } // fixes nemo statusbar

//.nemo-window,
filechooser,
.nautilus-window {
  paned > separator { // Use paned separator to hide stack border-bottom-left-radius
    border: none;
    background-color: transparent;
    background-image: image($base_color);
    background-size: 8px 8px;
    background-position: left bottom;

    &:dir(ltr) { margin-left: -1px; }
    &:dir(rtl) { margin-right: -1px; }
  }
}

filechooser placessidebar.sidebar.frame { border-right: 1px solid if($variant=='light', $borders_color, $header_border); }

// transparent sidebars
%placessidebar,
filechooser,
.nautilus-window {

  &.csd.background, placessidebar list { background-color: transparent; }
  &.csd.background, placessidebar { background-color: $dark_sidebar_bg; border-radius: 0 0 $wm_radius $wm_radius; }

  placessidebar.sidebar {
    border-right: 1px solid if($variant=='light', $borders_color, $header_border);
    background-color: transparent;

    row.sidebar-row {
      color: $dark_sidebar_fg;

      .sidebar-icon { color: transparentize($dark_sidebar_fg, 0.15); }

      &.has-open-popup,
      &:disabled {
        &, label, image { color: transparentize($dark_sidebar_fg, 0.6); }
      }

      &:backdrop { opacity: 0.85; }

      &:selected.has-open-popup,
      &:selected, &:selected:hover, &:active:hover {
        color: $fg_color;
        background-color: $sidebar_theme_color;
        &, label { color: $fg_color; }
      }

      &.sidebar-new-bookmark-row {
        color: $selected_bg_color;

        .sidebar-icon { color: inherit; }
      }

      &:drop(active):not(:disabled) {
        &, label, .sidebar-icon { color: $dark_sidebar_fg; }

        &:selected {
          &, label, .sidebar-icon { color: $dark_sidebar_fg; }
          background-color: $drop_target_color;
        }
      }
    }

    separator { background-color: transparent; }

    scrollbar { @extend %dark_sidebar_scrollbar }
  }

  &.maximized placessidebar { border-radius: 0; }
  &.maximized placessidebar.sidebar { background-color: opacify($dark_sidebar_bg, 1); }

  placesview {
    actionbar.background { border-radius: 0 0 $wm_radius 0; }
  }
}

filechooser {
  actionbar {
    color: $dark_sidebar_fg;
    background-color: $dark_sidebar_bg;
    border-color: $borders_color;

    button { @extend %dark_sidebar_button; }
    entry { @extend %dark_sidebar_entry; }

    @extend %osd_check_radio;

    label, combobox { color: $dark_sidebar_fg; }
  }

  box#pathbarbox.view {
    stack {
      entry.search {
        &, &:focus {
          background-color: darken($entry_bg, 2%);
        }

        &:disabled {
          background-color: rgba(darken($entry_bg, 2%), 0.55);
        }
      }
    }
  }

  box.vertical > paned > separator { // Use paned separator to hide stack border-bottom-left-radius
    border: none;
    background-color: transparent;
    background-image: image($base_color);
    background-size: 8px 8px;
    background-position: left bottom;

    &:dir(ltr) { margin-left: -1px; }
    &:dir(rtl) { margin-right: -1px; }
  }
}

.caja-side-pane {
  &,
  > notebook > stack > widget > box,
  text,
  treeview {
    color: $dark_sidebar_fg;
    caret-color: $dark_sidebar_fg;
    background-color: opacify($dark_sidebar_bg, 1);
  }

  > box button {
    &:not(:active):not(:checked) { color: $dark_sidebar_fg; }
    // &:hover:not(:active) { @include button(hover); }
  }

  .frame { border-color: $borders_color; }

  scrollbar { @extend %dark_sidebar_scrollbar; }
  junction { background-color: darken($dark_sidebar_bg, 5%); }
}

%dark_sidebar_button {
  @include button(normal);

  &:hover { @include button(hover); }
  &:active, &:checked { @include button(active); }
  &:disabled { @include button(insensitive); }
}

%dark_sidebar_entry {
  @include entry(normal);

  &:focus { @include entry(focus); }
  &:disabled { @include entry(insensitive); }
}

%dark_sidebar_scrollbar {

  border-color: transparent;

  &.overlay-indicator:not(.dragging):not(.hovering) slider {
    background-color: rgba(lighten($dark_sidebar_fg, 15%), 0.35);
    border: none;
  }
  slider {
    min-width: 4px;
    background-color: transparentize(lighten($dark_sidebar_fg, 15%), 0.3);

    &:hover { background-color: lighten($dark_sidebar_fg, 20%); }

    &:hover:active { background-color: $header_button_checked_bg; }

    &:disabled {
      background-color: transparent;
    }
  }
  trough {
    background-color: transparent;
  }
}
